package com.framework.dubbo.producer.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 描述：
 *
 * @author xianggj
 * @Date 2021/8/25 16:06
 **/
@Configuration
public class WebMVCConfig implements WebMvcConfigurer {

    @Resource
    private Pdf2HtmlProperties pdf2HtmlProperties;

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("static/**").addResourceLocations("file:"+pdf2HtmlProperties.getSourceDir());
    }

}
